//
//  ComfrimViewController.m
//  TuiTe
//
//  Created by 张 霄鹤 on 10-7-15.
//  Copyright 2010 xhzhang. All rights reserved.
//

#import "ComfrimViewController.h"


@implementation ComfrimViewController

@synthesize active;

@synthesize imgStatus;

/*
 // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
        // Custom initialization
    }
    return self;
}
*/


// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
	[self makeView];
}


// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];

	[self makeView];
}


/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/

- (void)didReceiveMemoryWarning {
	// Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
	
	// Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
	// Release any retained subviews of the main view.
	// e.g. self.myOutlet = nil;
	
	self.imgStatus = nil;
	self.active = nil;
	self.view = nil;
}

- (void)makeView{
	// TODO make view
	UIView *v = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
	v.backgroundColor = [UIColor lightGrayColor];
	v.alpha = 0.5;
	UIImageView *imgView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 48, 48)];
	UIActivityIndicatorView *ac = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(50, 0, 48, 48)];
	
	self.imgStatus = imgView;
	self.active = ac;
	self.view = v;
	
	[self.view addSubview:self.imgStatus];
	[self.view addSubview:self.active];
	
	[imgView release];
	[ac release];
	[v release];
}


- (void)dealloc {
    [super dealloc];
}


@end
